const bcrypt = require('bcryptjs');

// 生成密码哈希
async function generatePasswordHash(password) {
  const salt = await bcrypt.genSalt(10);
  const hash = await bcrypt.hash(password, salt);
  return hash;
}

// 默认密码: admin123
generatePasswordHash('admin123').then(hash => {
  console.log('密码哈希:', hash);
  console.log('\n请将此哈希值复制到 users.json 文件中');
});

